<template>
    <div v-for="item in items" :key="item.id">
      <div v-if="item.type === 'system'">
        <div>系统消息：{{ item.content }}</div>
      </div>
      <p v-else-if="item.type === 'msg'">{{ item.content }}</p>
    </div>
  </template>
  
  <script>
  export default {
    data() {
      return {
        items: [
          { id: 1, type: 'system', content: '系统消息1' },
          { id: 2, type: 'msg', content: '普通消息1' },
          { id: 3, type: 'msg', content: '普通消息2' },
          { id: 4, type: 'system', content: '系统消息2' },
        ],
      };
    },
  };
  </script>

  
  